# Sample apps for Microsemi VPROC Devices Host Bus Interface
# Current Makefile compiles app using user-space driver for linux
# platform.
# user can modify OBJS variable to point to platform independent # HBI driver for non-linux platform

# These should always be included as defines Driver configuration
# parameter
include $(ROOTDIR)/Makefile.globals
include $(ROOTDIR)/config.mk

#TOOLCHAIN path for userspace build. 
#Uncomment if doing cross compilation 
#SYSROOT=$(TOOLSPATH)/arm-linux-gnueabihf/libc

#link to hbi user space driver for linux platform
#user can modify OBJS to link platform independent 
#hbi driver objs
OBJS = $(INSTALL_LIB_PATH)/hbi_u.o $(INSTALL_LIB_PATH)/hbi_tw.o

SRC = 
#default TARGET built is test_mixer
APPS = test_mixer

INCLUDES += -I$(ROOTDIR)/drivers/hbi/inc 

#LDFLAGS += --sysroot=$(SYSROOT)

ifneq ($(DEBUG),)
LDFLAGS += -g
endif

.PHONY: $(APPS)
all: $(APPS)

$(APPS):
	$(CC)  $(OBJS) $(SRC) $@.c $(EXTRA_CFLAGS) $(INCLUDES) $(LDFLAGS) -o $@	

clean:
	rm -f *.out *.o

	
